<!--
 * @Author: lizilong 94648929@qq.com
 * @Date: 2022-11-12 16:55:04
 * @LastEditors: lizilong 94648929@qq.com
 * @LastEditTime: 2022-12-22 00:13:11
 * @FilePath: \sofast-admin\src\views\account\LoginView.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->

<script lang="ts" setup>
import { reactive } from "vue";
import { useRouter } from "vue-router";

const router = useRouter();

// do not use same name with ref
const form = reactive({
  name: "",
  pswd: "",
  check: false,
});



const onSubmit = () => {
  console.log("submit!");
  router.push({ path: "/wel" });
};
</script>

<template>
  <div class="h-full w-full flex justify-center items-center">
    <div class="login-box w-4/5 sm:w-1/2 md:w-4/5 lg:w-3/5 xl:w-1/2 2xl:w-2/5">
      <div class="login-title mb-10 text-4xl">欢迎注册</div>
      <div class="login-form">
        <el-form :model="form" label-width="0" size="large">
          <el-form-item>
            <el-input v-model="form.name" placeholder="用户名" />
          </el-form-item>
          <el-form-item>
            <el-input v-model="form.name" placeholder="密码" />
          </el-form-item>
          <el-form-item>
            <el-input v-model="form.name" placeholder="手机号" />
          </el-form-item>
          <el-form-item>
            <div class="w-full">
              <div class="flex">
                <div class="flex-grow h-16">
                  <el-input v-model="form.pswd" placeholder="验证码" />
                </div>
                <div class="flex-none w-22 h-16 ml-4">
                  <el-button type="primary" class="w-full" auto-insert-space @click="onSubmit">{{
                      $t("account.getCode")
                  }}
                  </el-button>
                </div>
              </div>
              <!-- <el-row :gutter="20">
                <el-col :span="16">
                  <el-input v-model="form.pswd" placeholder="验证码" />
                </el-col>
                <el-col :span="8">
                  <el-button type="primary" class="w-full" auto-insert-space @click="onSubmit" :loading="loading">{{
                  loading ? '' : $t("account.getCode")
                  }}
                  </el-button>
                </el-col>
              </el-row> -->
            </div>
          </el-form-item>
          <el-form-item>
            <el-button type="primary" class="w-full" auto-insert-space @click="onSubmit" :loading="loading">{{
                loading ? '' : $t("account.register")
            }}
            </el-button>
          </el-form-item>
        </el-form>
      </div>
    </div>
  </div>
</template>
